package com.ce.server.common;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ce.server.pojo.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.util.List;

/**
 * @DATE: 2021/11/19 10:05
 * @Author: 小爽帅到拖网速
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@Api(value = "AdminVo")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class AdminVo {
  @ApiModelProperty(value = "用户id")
  @TableId(value = "id", type = IdType.AUTO)
  private Integer id;

  @ApiModelProperty(value = "用户账号")
  @Excel(name = "工号")
  private String wno;

  @ApiModelProperty(value = "用户名")

  @Excel(name = "姓名")
  private String wname;

  @ApiModelProperty(value = "加密后")
  private String password;

  @ApiModelProperty(value = "0代表男，1代表女")
  @Excel(name = "性别")
  private String gender;

  @ApiModelProperty(value = "年龄")
  @Excel(name = "年龄")
  private Integer age;

  @ApiModelProperty(value = "联系地址")
  @Excel(name = "联系地址")
  private String address;

  @ApiModelProperty(value = "手机号码")
  @Excel(name = "手机号码")
  private String telephone;

  @ApiModelProperty(value = "0为未启用，1为已启用")
  @Getter(value = AccessLevel.NONE)
  private String enabled;

  @ApiModelProperty(value = "出生日期")
  @Excel(name = "出生日期")
  private LocalDate birthday;

  @ApiModelProperty(value = "身份证号")
  @Excel(name = "身份证号码")
  private String isCard;

  @ApiModelProperty(value = "籍贯")
  @Excel(name = "籍贯")
  private String nativePlace;

  @ApiModelProperty(value = "民族id")
  private Integer nationId;


  @ApiModelProperty(value = "民族")
  @TableField(exist = false)
  @ExcelEntity
  private Nation nation;

  @ApiModelProperty(value = "职位ID")
  private Integer posId;

  @ApiModelProperty(value = "职位")
  @TableField(exist = false)
  @ExcelEntity
  private Position position;

  @ApiModelProperty(value = "政治面貌id")
  private Integer politicId;

  @ApiModelProperty(value = "政治面貌")
  @TableField(exist = false)
  @ExcelEntity
  private PoliticsStatus politicsStatus;

  @ApiModelProperty(value = "头像地址")
  private String userface;

  @ApiModelProperty(value = "角色列表")
  @TableField(exist = false)
  private List<Role> roles;
}
